<template>
  <div class="update-name">
    <van-nav-bar class="nav-title"
                 title="设置昵称"
                 left-text="取消"
                 right-text="完成"
                 left-arrow
                 @click-left="$emit('close')"
                 @click-right="$emit('close')" />
    <div>
      <div class="filed">
        <van-field v-model="localName"
                   rows="2"
                   autosize
                   type="textarea"
                   maxlength="7"
                   placeholder="请输入昵称"
                   show-word-limit />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'UpdateName',
  props: {
    value: {
      type: String,
      required: true
    }
  },
  data () {
    return {
      localName: this.value
    }
  },
  methods: {

  }
}
</script>

<style lang="less" scoped>
.nav-title {
  background-color: #41b883;
}
.filed {
  padding: 15px;
}
.van-field {
  background-color: #f9f8f8;

  // padding: 15px;
  // box-sizing: border-box;
}
</style>
